package com.huangdada.hfweather.service.impl;

import com.huangdada.hfweather.bean.SJWeather;
import com.huangdada.hfweather.bean.Weather;
import com.huangdada.hfweather.mapper.WeatherMapper;
import com.huangdada.hfweather.service.WeatherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description: 天气获取业务逻辑实现
 * @PROJECT_NAME: hf-weather
 * @CLASS_NAME:
 * @Author: huanglibin
 * @Date: 2020-03-30 21:38
 * @Version: 1.0
 */
@Service
public class WeatherServiceImpl implements WeatherService {

    @Autowired
    private WeatherMapper weatherMapper;

    @Override
    public List<Weather> queryWeatherAll() {
        return weatherMapper.queryAll();
    }

    @Override
    public Integer saveWeatherInfo(Weather weather) {
        return weatherMapper.saveWeatherInfo(weather);
    }

    @Override
    public Integer saveSJWeatherInfo(SJWeather weather) {
        return weatherMapper.saveSJWeatherInfo(weather);
    }

    @Override
    public Integer updateSJWeatherInfo(SJWeather weather) {
        return weatherMapper.updateSJWeatherInfo(weather);
    }

    @Override
    public SJWeather getWeatherByAreaidAndNamecn(String areaid, String namecn) {
        return weatherMapper.getWeatherByAreaidAndNamecn(areaid,namecn);
    }


}
